import Vue from "vue";
import Router from "vue-router";
import index from "./views/Index.vue";
import follow from "./views/Follow.vue";
import hot from "./views/Hot.vue";
import forget from "./views/Forget.vue";
import question from "./views/Question";
import articleInfo from "./views/UserArticle";
import people from "./views/People";
import search from "./views/Search";
import answer from "./views/WriteAnswer";
import invited from "./views/Invited";
import later from "./views/LaterAnswer";
import collection from "./views/CollectionList";
import writing from "./views/Writing";
import draft from "./views/Draft";
import drafts from "./views/DraftsIndex";
import listrule from "./views/ListRule";

Vue.use(Router);

export default new Router({
  routes: [
    //  主页
    {
      path: "/",
      name: "index",
      component: index
    },
    //  关注
    {
      path: "/follow",
      name: "follow",
      component: follow
    },
    // 热榜
    {
      path: "/hot",
      name: "hot",
      component: hot
    },
    //  等你来答
    {
      path: "/question",
      name: "question",
      component: question
    },
    //  忘记密码
    {
      path: "/forget",
      name: "forget",
      component: forget
    },
    //  文章详情
    {
      path: "/articleInfo",
      name: "articleInfo",
      component: articleInfo
    },
    //  个人主页
    {
      path: "/people",
      name: "people",
      component: people
    },
    //  搜索
    {
      path: "/search",
      name: "search",
      component: search
    },
    //  写回答
    {
      path: "/answer",
      name: "answer",
      component: answer
    },
    //  邀请回答
    {
      path: "/invited",
      name: "invited",
      component: invited
    },
    //  稍后答
    {
      path: "/later",
      name: "later",
      component: later
    },
    //  收藏夹
    {
      path: "/collection",
      name: "collection",
      component: collection
    },
    //  写回答
    {
      path: "/writing",
      name: "writing",
      component: writing
    },
    //  写文章草稿箱
    {
      path: "/draft",
      name: "draft",
      component: draft
    },
    //  真草稿箱
    {
      path: "/drafts",
      name: "drafts",
      component: drafts
    },
    //  榜单规则
    {
      path: "/listrule",
      name: "listrule",
      component: listrule
    }
  ]
});
